python Access both key and value using items()

40

dt = {'a': 'juice', 'b': 'grill', 'c': 'corn'}

for key, value in dt.items():
    print(key, value)

Comments

Submit
0 Comments